package com.doit.demo05;

import java.io.File;
import java.io.IOException;

public class test04_file {
    public static void main(String[] args) throws IOException, InterruptedException {
/*        //先判断是否有这个文件,有的话, 返回false 没有的话,创建后返回true
        File file = new File("d:\\work\\abc\\1.txt");
        System.out.println(file.createNewFile());
        File dir = new File("d:\\work\\abc\\11.txt");
        System.out.println(dir.mkdir());//只能创建单极文件夹 加个s就能创建多积德
        File dirr = new File("d:\\work\\abc\\11\\sdfsdf\\sf\\f");
        System.out.println(dirr.mkdirs());
*/

        File parent = new File("d:\\work\\abc");
        //创建文件夹
        File dir = new File(parent,"aaa");
        dir.mkdirs();
        //创建文件
        File file = new File(parent,"ssss.txt");
        file.createNewFile();
        Thread.sleep(1000);
        file.delete();

    }
}
